home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Audio 4.94 - Over 11,000 Files
/
audio-11000.iso
/
mac
/
midi
/
cmmdtlkt.hqx
/
CMU Midi Toolkit 23Mar88
/
Moxc Stuff
/
prog.c
< prev
next >
Wrap
Text File
|
1987-01-27
|
688b
|
45 lines
/* prog.c -- a little test of cmtprog.h and moxc
*
* musically, it doesn't even rate any comments...
*/
#include "cmtprog.h"
/* private functions: */
p1(void);
minor(int, int);
mainscore()
begin
repeat(i, 10)
p1();
when random(0, 1) == 1 then
pnote(51, 300);
pnote(54, 300);
pnote(58, 300);
minor(50, 300);
otherwise
endwhen
p1();
endrep
end
private p1()
begin
midi_program(1, random(1, 32));
rest(20);
note(48, 15);
note(59, 25);
note(56, 23);
repeat(j, 3)
minor(random(36, 48), 20);
endrep
end
private minor(tonic, duration)
begin
pnote(tonic, duration);
pnote(tonic + 3, duration);
note(tonic + 7, duration);
end